{% extends "layout.html" %}

{% block body %}
    <div class="card" style="width: 50rem;margin:10px auto 0;">
        <!--img src="#" class="card-img-top" alt="..."-->
        <div class="card-body">
            <!--h5 class="card-title">Card title</h5-->
            <!--p class="card-text">Some quick example text to build on the card title and make up the bulk of the card’s
                content.</p-->
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th>书名</th>
                        <th>价格</th>
                        <th>作者</th>
                    </tr>
                </thead>
                <tbody>
                    {% for item in book_list %}
                    <tr>
                        <td>{{ item.title }}</td>
                        <td>{{ item.price }}</td>
                        <td>{{ item.author }}</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
            <form action="/upload" method="post" enctype="multipart/form-data">
                <input type="file" name="excel_file" accept=".xls,.xlsx" required>
                <input type="submit" class="btn btn-primary" value="导入书籍">

            </form>


        </div>

    </div>



{%  endblock %}